<?php
require_once 'glob.php';
function getmember($username='') {
	$sql='select * from sn_members where name = "'.$username.'"';
	$res=$GLOBALS[db]->getrow($sql);
	if($res){
		$mail= $res['mail'];
	}else {
		$mail= '用户不存在!';
	}
	return $mail;
}
$soap = new soap_server;
$soap->configureWSDL('getmember',""); // 初始化对 WSDL 的支持
// 注册服务
$soap->register('getmember',
array("str1"=>"xsd:string"), // 输入参数的定义
array("return"=>"xsd:string") // 返回参数的定义
);
$HTTP_RAW_POST_DATA = isset($HTTP_RAW_POST_DATA) ? $HTTP_RAW_POST_DATA : '';
$soap->service($HTTP_RAW_POST_DATA);

?>